import { localCache } from '@/utils/cache'
import hyRequest from '..'

export function loginRequest(userInfo: any) {
  return hyRequest.post({
    url: 'api/user/login',
    data: userInfo,
  })
}

export function getUserInfoRequest(id: number) {
  return hyRequest.get({
    // url: 'api/user/' + id,
    url: `api/user/${id}`,
    // headers: {
    //   Authorization: 'bearer ' + localCache.getCache('token'),
    // },
  })
}

export function getUserMenuById(id: number) {
  return hyRequest.get({
    url: `api/user/menus/${id}`,
  })
}

export function getUserListRequest() {
  return hyRequest.get({
    url: `api/msg`,
    // params: {
    //   page: 1,
    //   size: 10,
    //   send_user_id: 1,
    //   rev_user_id: 2,
    // },
  })
}
